<?php

namespace App\Http\Model\Admin;

use Illuminate\Database\Eloquent\Model;

class Record extends Model
{
    //  table name
    protected $table = 'record';

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [

    ];


    // 获取dsp数据最后记录的id
    public function getDspUpdateId()
    {
    	$result = self::find(1);

    	return $result['update_id'];
    }




    // 更新最后dsp数据记录
    public function updateDspData($updateId)
    {
    	$data = array(
    		"update_id" => $updateId,
    		);

        return self::where('id', 1)->update($data);
    }

}
